<template>
  <el-menu
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        default-active="2"
        text-color="#fff"
        @open="{}"
        @close="{}"
        @select="selectIndex"
      >
        <el-sub-menu index="1">
          <template #title>
            <el-icon><location /></el-icon>
            <span>客户服务</span>
          </template>
          <el-menu-item-group >
            <el-menu-item index="1-1">申请单</el-menu-item>
            <el-menu-item index="1-2">申请记录</el-menu-item>
          </el-menu-item-group>
        </el-sub-menu>
      </el-menu>
</template>

<script>
export default {
    name:'Menu',
    data() {
        return {}
    },
    methods:{
      /**
       * 获取到左侧菜单的唯一标识index
       * @param {*} index 
       */
      selectIndex(index){
        if(index == "1-1"){
          this.$router.push("/customer");
        }else if(index == "1-2"){
          this.$router.replace("/customer_manage");
        }else{

        }
      }
    }
}

</script>

<style scoped>
</style>